{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "978abd49",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0 1 2 3 4 5 6 7 8 9]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "a = np.arange(10)\n",
    "print(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "99997950",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world\n"
     ]
    }
   ],
   "source": [
    "print(\"hello world\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "968b6525",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0 1 2 3 4 5 6 7 8 9]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "a = np.arange(10)\n",
    "print(a)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5e882030",
   "metadata": {},
   "source": [
    "# 这是一个标记，markdown"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "c69df39c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "验证是否实现代码提示\n"
     ]
    }
   ],
   "source": [
    "print(\"验证是否实现代码提示\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "78ef45f5",
   "metadata": {},
   "outputs": [],
   "source": [
    "a = 10\n",
    "b = 5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "39695b98",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2.0\n"
     ]
    }
   ],
   "source": [
    "c = a/b\n",
    "print(c)\n",
    "b = 0"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3de15adb",
   "metadata": {},
   "source": [
    "#### jupyter notebook运行原理是把所有运行了的变量存储在内存中，所以如果后面的cell中的代码修改了之前cell中的值，那么重复运行cell，可能会得不到预期的结果，甚至报错。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a50c763b",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
